﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace TianShiProject.Migrations
{
    public partial class tianshen : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
           

            migrationBuilder.CreateTable(
                name: "ProcedureList",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    Node = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    NodeName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProcedureState = table.Column<int>(type: "int", nullable: false),
                    BeginId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    BeginName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CaoId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    CaoName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DaiId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    DaiName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CaoNameed = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ShenId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    IsDelete = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ProcedureList", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "ProcedureLog",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    LogNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProcedureId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    NodeNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    NodeName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CaoId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    CaoName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    IsRead = table.Column<int>(type: "int", nullable: false),
                    IsTong = table.Column<int>(type: "int", nullable: false),
                    IsDelete = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ProcedureLog", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "ProcedureNode",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    ProcedureNodeNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    NodeNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    NodeName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CaoId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    CaoName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    NextNodeNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PrevNodeNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    IsDelete = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ProcedureNode", x => x.Id);
                });

           

            migrationBuilder.DropTable(
                name: "ProcedureList");

            migrationBuilder.DropTable(
                name: "ProcedureLog");

            migrationBuilder.DropTable(
                name: "ProcedureNode");

           
        }
    }
}
